<%--
  Created by IntelliJ IDEA.
  User: asus
  Date: 2019/12/13
  Time: 18:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>setPropetry</title>
</head>
<body>
   <h1>setProPetry动作元素</h1>
   <jsp:useBean id="myUsers" class="com.po.Users" scope="application"></jsp:useBean>
   <!--根据表单自动匹配所有元素 -->
 <%--  <jsp:setProperty name="myUsers"  property="*" ></jsp:setProperty> --%>

   <!--根据表单匹配部分元素-->
   <% request.setCharacterEncoding("utf-8");%>
   <jsp:setProperty name="myUsers" property="userName" ></jsp:setProperty>
   <!--根据URL匹配部分元素   -->
   <jsp:setProperty name="myUsers" property="passWord" ></jsp:setProperty>
   <a href="jspScope.jsp" target="_blank">测试</a>
   <%--使用getProPerty方式获取元素--%>
  用户名:<jsp:getProperty name="myUsers" property="userName"></jsp:getProperty><br>
  密码:<jsp:getProperty name="myUsers" property="passWord"></jsp:getProperty> <br>
</body>
</html>
